package com.wangdong.wdutils.logger;

public class DLAndroidLogAdapter implements DLLogAdapter {

  private final DLFormatStrategy formatStrategy;

  public DLAndroidLogAdapter() {
    this.formatStrategy = DLPrettyFormatStrategy.newBuilder().build();
  }

  public DLAndroidLogAdapter(DLFormatStrategy formatStrategy) {
    this.formatStrategy = formatStrategy;
  }

  @Override
  public boolean isLoggable(int priority, String tag) {
    return true;
  }

  @Override
  public void log(int priority, String tag, String message) {
    formatStrategy.log(priority, tag, message);
  }

}